package com.frxuexi.adapter

import android.widget.TextView
import androidx.core.view.setMargins
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.frxuexi.lib_base.GlideUtil
import com.frxuexi.lib_base.entity.MyHourse
import com.frxuexi.lib_base.entity.MyNewHourse
import com.frxuexi.soufang.R
import com.google.android.flexbox.FlexboxLayout
import com.google.android.flexbox.FlexboxLayout.LayoutParams

class NewHourseAdapter:BaseQuickAdapter<MyNewHourse,BaseViewHolder>(R.layout.item_oldhourse) {
    override fun convert(helper: BaseViewHolder, item: MyNewHourse) {
        GlideUtil.loadImg(item.indexPictureUrl,helper.getView(R.id.old_iv))
        helper.setText(R.id.old_title,item.garden.name)
        helper.setText(R.id.old_desc,
            "${item.garden.region.parent.name}/${item.garden.region.name}/${item.areaRegion}")
        helper.setText(R.id.old_price,"${item.avgPrice}万")
        helper.setText(R.id.old_pricePer,item.moreDetails.get(0).content)


    }
}